package com.easy.auth.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.easy.auth.domain.Impreport;
import com.easy.auth.domain.Impreport;
import com.easy.auth.service.ImpreportService;
import com.easy.base.service.impl.EManagerImpl;
import com.easy.common.jdbc.PageInfo;
import com.easy.common.web.PagedList;

@Service
public class ImpreportServiceImpl extends EManagerImpl<Impreport> implements
		ImpreportService {

	@Override
	public PagedList<Impreport> getAllImpreport() {
		List<Impreport> ImpreportList = super.findList(new Impreport());
		return new PagedList<Impreport>(ImpreportList);
	}

	@Override
	public PagedList<Impreport> getImpreportList(Impreport impreport,   PageInfo pageInfo) {
		return super.findAllLike(impreport, pageInfo);
	}
	
	@Override
	public int saveImpreport(Impreport impreport) {
		return super.saveOrEdit(impreport);
	}

	@Override
	public Impreport findImpreportById(Impreport Impreport) {
		return super.findByOid(Impreport);
	}

	@Override
	public int removeImpreport(String[] oids) {
		List<Impreport> deptlist = new ArrayList<Impreport>();
		for (String oid : oids) {
			Impreport Impreport = new Impreport();
			Impreport.setOid(oid);
			deptlist.add(Impreport);
		}
		return super.removeAll(deptlist);
	}



}